[build-system]
requires = ['setuptools>=61.0']
build-backend = 'setuptools.build_meta'

[project]
name = 'sievemgr'
authors = [{name = 'Odin Kroeger'}]

description = 'Fully-featured ManageSieve command-line client and library'
keywords = [
    'managesieve',
    'sieve',
    'mail',
    'filter'
]

readme = 'README.rst'

requires-python = '>=3.9'
dependencies = [
    'dnspython>=2',
    'cryptography>=2.4'
]

classifiers = [
    'Development Status :: 4 - Beta',
    'Environment :: Console',
    'Intended Audience :: End Users/Desktop',
    'Intended Audience :: System Administrators',
    'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
    'Programming Language :: Python :: 3 :: Only',
    'Programming Language :: Python :: 3.9',
    'Programming Language :: Python :: 3.10',
    'Programming Language :: Python :: 3.11',
    'Programming Language :: Python :: 3.12',
    'Programming Language :: Python :: 3.13',
    'Natural Language :: English',
    'Operating System :: POSIX',
    'Topic :: Communications :: Email :: Filters'
]

dynamic = ['version']

[project.scripts]
sievemgr = 'sievemgr:main'

[project.urls]
homepage = 'https://odkr.codeberg.page/sievemgr'
repository = 'https://codeberg.org/odkr/sievemgr'
issues = 'https://github.com/odkr/sievemgr/issues'


[tool.bandit]
skips = ['B101', 'B603']


[tool.mypy]
cache_fine_grained = true
check_untyped_defs = true
ignore_missing_imports = true
no_error_summary = true


[tool.pylint.main]
jobs = 8
load-plugins = [
	#'pylint.extensions.code_style',
	'pylint.extensions.for_any_all',
	'pylint.extensions.consider_ternary_expression',
	#'pylint.extensions.bad_builtin',
	'pylint.extensions.dict_init_mutate',
	'pylint.extensions.docstyle',
	'pylint.extensions.dunder',
	'pylint.extensions.check_elif',
	'pylint.extensions.eq_without_hash',
	'pylint.extensions.overlapping_exceptions',
	'pylint.extensions.docparams',
	'pylint.extensions.redefined_loop_name'
]

reports = false
score = false

[tool.pylint.design]
max-args = 7
max-attributes = 20
max-branches = 20
max-locals = 35
max-parents = 7
max-public-methods = 20

[tool.pylint.'messages control']
disable = [
	'locally-disabled',
        'raw-checker-failed',
	'suppressed-message',
        'too-few-public-methods',
	'too-many-lines',
	'unspecified-encoding',
	'wrong-import-position'
]

[tool.pylint.refactoring]
max-nested-blocks = 7

[tool.pylint.string]
check-quote-consistency = true


[tool.pyright]
typeCheckingMode = 'strict'
reportPossiblyUnboundVariable = false
reportMissingParameterType = false
reportMissingTypeArgument = false
# Already checked by PyLint.
reportPrivateUsage = false
reportUnknownArgumentType = false
reportUnknownLambdaType = false
reportUnknownMemberType = false
reportUnknownParameterType = false
reportUnknownVariableType = false

[tool.ruff.lint]
ignore = ['E402']


[tool.vulture]
ignore_names = ['complete_*', 'do_*']
min_confidence = 80


[tool.setuptools]
py-modules = ['sievemgr']

[tool.setuptools.dynamic]
version = {attr = 'sievemgr.__version__'}
